# Once done, this will define
#
#  RKMEIDA_INCLUDE_DIR - the rkmedia include directory
#  RKMEIDA_LIBRARY_DIR - the rkmedia library directory
#  RKMEIDA_LIBS - link these to use rkmedia
#
#  ......

MACRO(LOAD_RKMEIDA os arch)
    #MESSAGE(INFO "--------------------------------")
    #MESSAGE(STATUS "3RDPARTY_DIR: ${3RDPARTY_DIR}")
    #FIND_FILE(SPDLOG_INCLUDE_DIR include ${3RDPARTY_DIR} NO_DEFAULT_PATH)
    #FIND_FILE(SPDLOG_LIBRARY_DIR lib ${3RDPARTY_DIR} NO_DEFAULT_PATH)
    set(USE_RKAIQ ON)

    if(USE_RKAIQ)
        # find_package(RkAiq REQUIRED)
        # include_directories(${RKAIQ_INCLUDE_DIRS})
        add_definitions(-DRKAIQ)
    endif()
    #head file path
    set(BASE_PATH /home/userdata/lizh/rv1126_facial_gate_release/external/camera_engine_rkaiq)
    include_directories(
    ${BASE_PATH}/xcore
    ${BASE_PATH}/xcore/base
    ${BASE_PATH}/aiq_core
    ${BASE_PATH}/algos
    ${BASE_PATH}/common
    ${BASE_PATH}/common/linux
    ${BASE_PATH}/hwi
    ${BASE_PATH}/hwi/isp20
    ${BASE_PATH}/ipc
    ${BASE_PATH}/iq_parser
    ${BASE_PATH}/uAPI
    ${BASE_PATH}/ipc_server
    #algos/awb
    #../core/inc/luma
    #../core/inc/stat_3a_ae
    #../core/inc/stat_3a_af
    #../core/inc/orb
    #../core/inc/common
    ${BASE_PATH}/
    ${BASE_PATH}/include
    ${BASE_PATH}/include/common
    ${BASE_PATH}/include/common/mediactl
    ${BASE_PATH}/include/iq_parser
    ${BASE_PATH}/include/uAPI
    ${BASE_PATH}/include/xcore
    ${BASE_PATH}/include/xcore/base
    ${BASE_PATH}/include/algos
    ${BASE_PATH}/include/algos/a3dlut
    ${BASE_PATH}/include/algos/ablc
    ${BASE_PATH}/include/algos/accm
    ${BASE_PATH}/include/algos/acgc
    ${BASE_PATH}/include/algos/acp
    ${BASE_PATH}/include/algos/adebayer
    ${BASE_PATH}/include/algos/adehaze
    ${BASE_PATH}/include/algos/adpcc
    ${BASE_PATH}/include/algos/ae
    ${BASE_PATH}/include/algos/af
    ${BASE_PATH}/include/algos/afd
    ${BASE_PATH}/include/algos/afec
    ${BASE_PATH}/include/algos/agamma
    ${BASE_PATH}/include/algos/adegamma
    ${BASE_PATH}/include/algos/agic
    ${BASE_PATH}/include/algos/ahdr
    ${BASE_PATH}/include/algos/aie
    ${BASE_PATH}/include/algos/aldch
    ${BASE_PATH}/include/algos/alsc
    ${BASE_PATH}/include/algos/anr
    ${BASE_PATH}/include/algos/anr/tnr_md
    ${BASE_PATH}/include/algos/aorb
    ${BASE_PATH}/include/algos/ar2y
    ${BASE_PATH}/include/algos/asd
    ${BASE_PATH}/include/algos/asharp
    ${BASE_PATH}/include/algos/awb
    ${BASE_PATH}/include/algos/awdr
    ${BASE_PATH}/include/common/gen_mesh
    ${BASE_PATH}/include/ipc_server
    )

    include_directories(/home/userdata/lizh/rv1126_facial_gate_release/external/rkmedia/include/easymedia)
    include_directories(/home/userdata/lizh/rv1126_facial_gate_release/external/rkmedia/include/rkmedia)

    include_directories(/home/userdata/lizh/rv1126_facial_gate_release/external/rkmedia)
    include_directories(/home/userdata/lizh/rv1126_facial_gate_release/external/camera_engine_rkaiq)
    include_directories(/home/userdata/lizh/rv1126_facial_gate_release/external/rkmedia/examples)

    IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
        SET(RKMEIDA_LIBS
        drm
        rockchip_mpp
        rt
        rga
        easymedia
        rkaiq)
    ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Windows")
        SET(RKMEIDA_LIBS
        drm
        rockchip_mpp
        rt
        rga
        easymedia
        rkaiq)
    ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux")
ENDMACRO()